mod json_schema;

use json_schema::{get_string_literal, StructsTemplate};
use proc_macro::TokenStream;

#[proc_macro]
pub fn sql(_input: TokenStream) -> TokenStream {
    "fn hello() { println!(\"hello world\"); }".parse().unwrap()
}

#[proc_macro]
pub fn generate(input: TokenStream) -> TokenStream {
    let filename = get_string_literal(input).unwrap();
    let result = StructsTemplate::render(&filename).unwrap();
    result.parse().unwrap()
}
